package sz.szsmk.citizencard.model.network;


import sz.szsmk.citizencard.model.network.bean.request.CheckCodeRequest;
import sz.szsmk.citizencard.model.network.bean.request.CheckUserRequest;
import sz.szsmk.citizencard.model.network.bean.request.GetCodeRequest;
import sz.szsmk.citizencard.model.network.bean.request.LoginRequest;
import sz.szsmk.citizencard.model.network.bean.request.RegisterRequest;
import sz.szsmk.citizencard.model.network.bean.request.SetPsdRequest;
import sz.szsmk.citizencard.model.network.bean.response.CheckSmsResponse;
import sz.szsmk.citizencard.model.network.bean.response.ForgetResponse;
import sz.szsmk.citizencard.model.network.bean.response.GetCodeResponse;
import sz.szsmk.citizencard.model.network.bean.response.IbaseBean;
import sz.szsmk.citizencard.model.network.bean.response.UserBean;
import sz.szsmk.citizencard.model.network.bean.response.RegisterResponse;

import retrofit2.http.Body;
import retrofit2.http.POST;
import rx.Observable;
import sz.szsmk.citizencard.model.network.dzbean.req.GetOpenIdReq;
import sz.szsmk.citizencard.model.network.dzbean.res.GetOpenIdRes;

/**
 * Created by yang12345 on 2017/3/14.
 */

public interface GsdxNetApiService {

    /**
     * 验证验证码
     *
     * @return
     */
    @POST("checkSms")
    Observable<CheckSmsResponse> checkSms(@Body CheckCodeRequest body);

    @POST("loginByPassWord")
    Observable<UserBean> loginByPassWord(@Body LoginRequest body);

    /**
     * 获取验证码
     *
     * @return
     */
    @POST("app/uums/getSms")
    Observable<GetCodeResponse> getCode(@Body GetCodeRequest body);

    /**
     * 设置用户登录密码
     *
     * @param body
     * @return
     */
    @POST("forgetPassWord")
    Observable<ForgetResponse> forgetPassWord(@Body SetPsdRequest body);

    /**
     * 判断用户是否存在
     *
     * @param body
     * @return
     */
    @POST("checkUserByMobile")
    Observable<IbaseBean> checkUser(@Body CheckUserRequest body);

    /**
     * 注册
     *
     * @param body
     * @return
     */
    @POST("register")
    Observable<RegisterResponse> register(@Body RegisterRequest body);

    @POST("app/uums/getOpenId")
    Observable<GetOpenIdRes> getOpenId(@Body GetOpenIdReq body);

}
